package com.huaxin.common.Deprecated;

import android.support.v7.widget.RecyclerView;
import android.view.View;

import butterknife.ButterKnife;

/**
 * Created by Administrator on 2016/10/13.
 */

public  class BaseRecyclerViewHolder extends RecyclerView.ViewHolder{

    private View itemView;

    private int realPosition;


    public BaseRecyclerViewHolder(View itemView, boolean isBind) {
        super(itemView);
        if (isBind) {
            ButterKnife.bind(this, itemView);
            this.itemView = itemView;
        }
    }
    public void update(int position){
        this.realPosition =  position;
    }


    public void setOnClickListener(View.OnClickListener l){
        if(itemView!=null){
            itemView.setOnClickListener(l);
        }
    }

    public View getItemView() {
        return itemView;
    }

    public int getRealPosition() {
        return realPosition;
    }


}





